﻿package org.hsl.haxe.translation;
import org.hsl.haxe.Signal;
/**
 * A translator translates a native event/signal to data that will be included in a signal.
 */
interface ITranslator<D> {
	/**
	 * Translates a native event/signal to data that will be included in a signal.
	 */
	public function translate(nativeEvent:NativeEvent):D;
}
/**
 * A null object implementation of the ITranslator interface.
 */
class NullTranslator<D> implements ITranslator<D> {
	/**
	 * Creates a new null translator.
	 */
	public function new():Void {
	}
	public function translate(nativeEvent:NativeEvent):D {
		return null;
	}
}